<<<<<<< .mine
package Calc;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;

public class ExpressionTest extends Expression {
	public ExpressionTest(){
		super("");
	}

	@Test
	public void testExpression() {
		Expression expression=new Expression("1+2");
		assertEquals("[1, +, 2]", expression.expression.toString());
	}

	@Test
	public void testMain() {
		Expression.main(new String[1]);
		assertEquals(true, Expression.success);
	}
	
	@Test
	public void testToRight() {
		Expression expression=new Expression("(1+2)*3");
		expression.toRight();
		assertEquals("[1, 2, +, 3, *]", expression.right.toString());
		expression=new Expression("1+2*3");
		expression.toRight();
		assertEquals("[1, 2, 3, *, +]", expression.right.toString());
		expression=new Expression("1*2+3");
		expression.toRight();
		assertEquals("[1, 2, *, 3, +]", expression.right.toString());
		expression=new Expression("1*(1-1)");
		expression.toRight();
		assertEquals("[1, 1, 1, -, *]", expression.right.toString());
		expression=new Expression("(1)");
		expression.toRight();
		assertEquals("[1]", expression.right.toString());
	}
	
	@Test
	public void testGetResult() {
		Expression expression=new Expression("(1+2)*3+9-7");
		expression.getResult();
		assertEquals("11.0", expression.result);
	}

}
=======
package Calc;

import static org.junit.Assert.*;

import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;

public class ExpressionTest extends Expression {
	public ExpressionTest(){
		super("");
	}

	@Test
	public void testExpression() {
		Expression expression=new Expression("1+2");
		assertEquals("[1, +, 2]", expression.expression.toString());
	}

	@Test
	public void testMain() {
		Expression.main(new String[1]);
		assertEquals(true, Expression.success);
	}
	
	@Test
	public void testToRight() {
		Expression expression=new Expression("(1+2)*3");
		expression.toRight();
		assertEquals("[1, 2, +, 3, *]", expression.right.toString());
		expression=new Expression("1+2*3");
		expression.toRight();
		assertEquals("[1, 2, 3, *, +]", expression.right.toString());
		expression=new Expression("1*2+3");
		expression.toRight();
		assertEquals("[1, 2, *, 3, +]", expression.right.toString());
		expression=new Expression("1*(1-1)");
		expression.toRight();
		assertEquals("[1, 1, 1, -, *]", expression.right.toString());
		expression=new Expression("(1)");
		expression.toRight();
		assertEquals("[]", expression.right.toString());
	}
	
	@Test
	public void testGetResult() {
		Expression expression=new Expression("(1+2)*3+9-7");
		expression.getResult();
		assertEquals("11.0", expression.result);
	}

}
>>>>>>> .r13
